package com.example.wan1.view.wechat;

import androidx.fragment.app.Fragment;

import com.example.wan1.base.adapter.SubPagerAdapter;
import com.example.wan1.di.ano.ActivityScope;
import com.example.wan1.di.ano.FragmentScope;
import com.example.wan1.model.KnowledgeBean;

import java.util.ArrayList;
import java.util.List;

import dagger.Binds;
import dagger.Module;
import dagger.Provides;

import static androidx.fragment.app.FragmentStatePagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT;

/***
 * @Author: zxd
 * @CreateDate: 2020/8/26 16:31
 * @Description: 公众号 界面
 */
@Module
public abstract class WxModule {

    @Binds
    abstract WeChatContract.View wxView(WxFragment wxFragment);

    @FragmentScope
    @Provides
    static SubPagerAdapter provideAdapter(WxFragment activity) {
        return new SubPagerAdapter(activity.getChildFragmentManager(),
                BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
    }

    @FragmentScope
    @Provides
    static List<String> provideTitleList() {
        return new ArrayList<>();
    }

    @FragmentScope
    @Provides
    static List<Fragment> provideFragmentList() {
        return new ArrayList<>();
    }

    @FragmentScope
    @Provides
    static List<Integer> provideIdsList() {
        return new ArrayList<>();
    }

    @FragmentScope
    @Provides
    static List<KnowledgeBean> provideKnowledgeList() {
        return new ArrayList<>();
    }
}
